
if (typeof window=='undefined') {
    var fetch = require('node-fetch')
}

var dataProvider = {
    'message': '123456',
    msg:''
}

async function loadData (){
    let res_1 = await fetch("http://127.0.0.1:667/api.php")
    .then(function(response){ return response.json()} );
    dataProvider.msg = res_1.msg
    
    let res_2 = await fetch("http://127.0.0.1:667/api.php")
    .then(function(response){ return response.json()} );
    dataProvider.msg = res_2.msg
}

loadData()

if (typeof module !== 'undefined') {
    module.exports = dataProvider;
}
